Application of response surface methodology for COD and ammonia removal from municipal wastewater treatment plant using acclimatized mixed culture

This study aimed to optimize conditions influencing the removal of chemical oxygen demand (COD) and ammonia-N in municipal wastewater by using acclimatized mixed culture (AMC). Two-level factorial analysis was used to investigate the factors affecting the degradation of COD and ammonia-N (%); ratio of synthetic wastewater (SW) to acclimatized mixed culture (AMC) (1:1 and 3:1), presence and absence of support media (Yes and No), agitation (0 rpm and 100 rpm) and hydraulic retention time (HRT) (2 and 5 days). A central composite design (CCD) under response surface methodology (RSM) determined the optimum agitation (0 rpm and 100 rpm) and retention time (2 and 5 days). The best conditions were at 3:1 of SW: AMC ratio, 100 rpm agitation, without support media, and 5 days retention time. COD and ammonia-N removal achieved until 57.23% and 43.20%, respectively. Optimization study showed the optimum conditions for COD and ammonia-N removal were obtained at 150 rpm agitation speed and 5 days of retention time, at 70.41% and 64.29% respectively. This study discovers the conditions that affect the COD and ammonia-N removal in the municipal wastewater using acclimatized mixed culture.


Introduction
Municipal wastewater is classified by the high content of particulate organic matter and low organic strength (Sikosana et al., 2019). This type of wastewater can provoke human health issues as it can be hazardous when exposed numerously to the surrounding (Khalid et al., 2018). It is then compulsory to reduce the exposure of wastewater for the public's safety and healthiness, and welfare (Khaliq et al., 2017). Generally, the typical effluent's nutrient contained in municipal wastewater produces high concentrations or amounts of COD and ammonia-N. In the   A: SW: AMC ratio, B: support media, C: Agitation (rpm), D: Retention time (days).   A: SW: AMC ratio, B: support media, C: Agitation (rpm), D: retention time (days). municipal industry, the costs of operation are the expenses associated with the monitoring, maintenance, and operation of the plant. Evaluating operating costs during the process alternatives is crucial since the management cost is expensive and poses problems concerning how to finance it (Moral Pajares et al., 2019). Alternatively, the biological treatment, on the other hand, needs only a low quantity of chemicals and energy to reach higher efficiency in removing nutrients and organic carbon. These are, therefore, lead to a better cost-effective and environmental-friendly method for municipal wastewater treatment (Rajasulochana and Preethy, 2019). In biological treatment, a mixed culture is used instead of a single culture to reduce COD and ammonia-N concentration. The use of mixed culture as an alternative method for biological treatment in WWTP has widely been used in the industry nowadays (Samer, 2015). The biological treatment of wastewater has been proven to need a small number of chemicals and energy to reach higher efficiency to remove nutrients and organic carbon. Thus, the apparent economic advantage of biological treatment over other treatment methods such as chemical oxidation is a capital investment and operating costs. Biological treatment is preferable since it relies on microorganisms or mixed culture, to be specific, in breaking down organic wastes using normal cellular processes (Fluence News Team, 2017) to reduce the concentration of COD and ammonia-N. Studies have demonstrated that the application of mixed cultures over pure cultures in the degradation of pollutants offers advantages, possibly incorporated with the synergistic interactions between the associated members (Constanza et al., 2019). Research also has shown a few typical factors that affect wastewater treatment. Agitation affects the maximum reduction of organic substances in treated sludge. The performance of COD and ammonia-N in municipal wastewater was found to be the highest in 12 days retention time with 95% removal (Sa'at et al., 2019). The total nitrogen removal efficiency was improved by retention time reduction in municipal wastewater, which increases from 80% to 86% (Belli et al., 2017). Additionally, as Salama et al. (2014) mentioned, certain support media provide potential advantages for removing COD and BOD 5 from municipal wastewater in Morocco, displaying that COD removal goes up to 67.76%, particularly in the biological treatment with PVC media.
One of the most common and powerful experimental designs is full factorial design, in which simulation runs are performed at all combinations of factor levels. The interaction effects of the factors on a response can be investigated by using the full factorial designs. The effect of each factor on the response variable is studied by changing the level of that factor (Jamshidnezhad, 2015). Rahman (2019) mentioned that a full factorial design sometimes seems to be tedious and needs many samples. A fractional design would allow the reduction of experiments from the full factorial with the sacrifice in minor higher-level interaction and nonlinearity effects. Fractional factorial designs are the most widely and commonly used types of design in the industry (Jamshidnezhad, 2015). Analysing one process may be costly, time-consuming, and require much energy as the factors may influence the process. Hence, it is helpful to apply the RSM in designing an experiment, evaluate the factors, and determine optimum conditions for the responses. This study aimed to discover the factors that significantly affect the COD and ammonia-N removal in the municipal wastewater through acclimatized mixed culture and to optimize the condition of biological processes in municipal wastewater using AMC.

Materials collection
The sampling of both municipal wastewater and mixed culture was conducted from a municipal wastewater pond located at Seremban, Negeri Sembilan. The municipal wastewater was sampled from the pond, while mixed culture was taken from the pond's sediment. The stones ranged from diameter 1.3-2.0 cm each were brought from the store.

Preparation of synthetic wastewater
The synthetic wastewater was prepared based on the contents of COD and ammonia-N in the analyzed sample. Fertilized ammonia-N was added into the municipal wastewater if the COD and ammonia-N content was too low. These are to achieve the COD and ammonia-N design parameters of 449 mg/L and 1000 mg/L, respectively.

Mixed-cultures acclimatization
Acclimatization was carried out to ensure the mixed culture's adaptations to the concentration of total COD and ammonia-N in the 5000 mL acclimatized reactor. The nutrient stock was prepared by using 1.4 g of commercial nutrient stock (CNS) that dissolved in distilled water of 1875 mL and added daily with 1250 mL of mixed culture for the first week in the acclimatized reactor. For the second week, 1.4 g of CNS was mixed with 26 g of fertilized ammonia-N with distilled water to form 1875 mL of synthetic wastewater and was added daily into the acclimatized reactor, with the concentration of COD and TSS were 449 mg/L and 2188 mg/L, respectively. This procedure was carried out daily for two weeks, with 267 mL of CNS prescribed daily for the first week and 267 mL of CNS with fertilized ammonia-N administered daily for the second week.

Preliminary experiment
Synthetic wastewater was newly prepared to substitute the wastewater collected from Cenviro Sdn Bhd for the preliminary experiment. The influence of retention time on COD and ammonia-N removal were investigated in the preliminary experiment. The experiment was performed in accordance with the best condition obtained from a previous study of COD and ammonia-N for municipal wastewater as displayed in Table 1. 187 ml of synthetic wastewater (SW) and 63 ml of acclimatized mixed culture (AMC) were mixed to produce a 250 ml volume mixture according to retention time. The samples were tested using a DR3900 HACH spectrophotometer after five days to obtain the COD and ammonia-N removal value. Table 2 shows the selected factors and ranges of municipal wastewater treatment. The factors include SW to AMC ratio (1:1 and 3:1), presence and absence of support media, agitation (0 rpm and 100 rpm), and retention time (2 and 5 days). A new SW mixture was prepared for the factorial analysis experiment using fertilized ammonia-N to replace municipal wastewater from Cenviro Sdn Bhd. The experiments were run in two cycles: 2 days for the first cycle and 5 days for the second cycle. For the first cycle, 8 conical flasks were prepared and divided into 4 by 4 flasks of each ratio. For the 1:1 ratio, the first and third flasks were filled with 85 mL of AMC and 85 mL of SW, while the second flask was filled with 135 mL of AMC and 135 mL of SW. The fourth flask was filled with 125 mL of AMC and 125 mL of SW. For the 3:1 ratio, the first and third flasks were filled with 42.5 mL of AMC and 127.5 mL of SW, while the second flask was filled with 67.5 mL of AMC and 202.5 mL of SW. The 4th flask was filled with 62.5 mL of AMC and 187.5 mL of SW. The initial reading was taken from the solution prepared in the second flask for both ratios. The stone was used as support media for the factorial analysis experiment. 80 mL of stones were added into 4 beakers based on the Design-Expert table. The experiment was conducted in two conditions which were with agitation (100 rpm) and without agitation (0 rpm). 4 conical flasks with agitation were left on an orbital shaker for 2 days with 100 rpm. For the second cycle, the same procedure was performed, and the sample was tested after 5 days of retention time. The experiment was carried out in accordance with the setup generated by Design-Expert software, as shown in Table 3, with all factors being randomized. The data was then analysed to find the most important elements. COD and ammonia-N removal were the two responses.

Experimental setup for optimization
The experiments were designed according to CCD with two factors to determine the optimum process parameters. Two factors chosen were; agitation with the range of 50-150 rpm and retention time which ranges from 4 to 6 days. The best condition for COD and ammonia-N removal were utilized to determine the selected value of center point, which is 100 rpm agitation speed and 5 days retention times for CCD experimental setup. The experiments were conducted according to the optimization table (Table 4), with SW: AMC and support media being kept constant during the experiment.

Total solids analysis
A dry weight measurement method was used to determine the total solids analysis (Equation 1). Firstly, the empty aluminium cup was heated up in the oven for 1 hour at 105 C to make sure there was no moisture content available. The weight of the dried aluminium cup was then recorded. Following that, 50 mL of sample (mixed culture) was placed in an aluminium cup and weighted. The sample was then placed in the oven again for 1 hour at 105 C until it dry.

Total Solids ¼
Weight of dried sample À Weight of empty aluminium cup Volume of the Sample (1)

Removal analysis of COD
The USEPA Reactor Digestion Method was used to calculate COD removal (Method 8000) (Massalha et al., 2020). The mixture of synthetic wastewater (SW) and acclimatized mixed culture (AMC) was   then analyzed using a HACH Spectrophotometer to determine COD removal.

Removal analysis of ammonia-N
The removal of ammonia-N was determined through the Salicylate method (Method 10031). Both acclimatized mixed culture (AMC) and synthetic wastewater (SW) were diluted with deionized water by 100 dilution factors due to the high range of ammonia-N in the mixture. The removal of ammonia-N was then determined by using HACH Spectrophotometer.

Data analysis
The data collected were tabulated in the Design-Expert software. The best condition and optimum conditions for removal of both COD and ammonia-N were analyzed using Design-Expert software.

Validation studies
A validation experiment was performed to validate the result obtained with COD and ammonia-N, both at maximum value. A comparison was made between the experimental and predicted value in order to justify the validity of the model.

Preliminary experiments
The reading of COD removal for the preliminary study was taken from a sample from day 0 till day 10. Figure 1 exhibited the COD test reading for each day accordingly. The determination of retention time for the factorial analysis was based on the result of the COD removal. The COD removal percentage increased from day 2 until day 5 as shown in Figure 1. These may be due to the consumption of COD by AMC and the suitable reaction between AMC and SW in those ranges. The removal percentage began to fluctuate from day 6 to day 10. The inconsistency of AMC in treating SW in a much longer time might be the reason for the fluctuated removal of COD. The COD removal obtained from this experiment was 73% when using mixed culture. The removal of COD A. Ya'acob et al.
Heliyon 8 (2022) e09685 obtained by Neoh et al. (2016) was only 71% when using a pure culture of Ochrobactrum sp. for palm oil mill effluent (POME) under the aerobic condition. The treatment with the mixed culture of Scirpus grossus and Iris pseudacorus exhibited a better removal than its single culture where the removal of COD and BOD was up to 89% and 97%, respectively Batik wastewater treatment using the intermittent method (Ladu et al., 2014).
To sum up, day 5 displayed the highest removal percentage of COD in the preliminary experiment. Since all samples took a longer time to remove all COD in wastewater, the experiment was discontinued after 10 days. An increase in COD removal from day 2 to day 5, which was 56% and 73%, respectively, represents the positive removal of COD in the municipal wastewater. Hence, 2 days and 5 days were selected and used for factorial study. Table 5 presented 16 experimental runs and the removal percentage of COD and ammonia-N. ANOVA was used to analyze the responses based on a 95% confidence level. The removal of COD ranges from 13.89% to 95.12 %, while for ammonia-N, the range is from 12.50% to 66.67%. The lowest percentage of COD removal was recorded in a condition of 1:1 SW: AMC ratio, without support media and agitation with 2 days of retention time. Meanwhile, the highest recorded removal of COD was obtained in an experimented condition of 1:1 SW: AMC ratio, with support media, 0 rpm agitation, during 5 days of retention time. For ammonia-N removal, the lowest percentage value was obtained in a condition of 1:1 SW: AMC ratio, with support media, without agitation and 5 days of retention time. The highest value of ammonia-N removal was obtained in a condition of 3:1 SW: AWC ratio, no support media, 0 rpm agitation, and retention time of 2 days.

Factor screening for COD removal
The contributions of each factor on COD removal were A -Ratio SW: AMC (4.09%), B -Support Media (0.23%), C -Agitation (11.96%) and D -Retention Time (32.47%). The retention time contributed the most while support media exhibited the least contribution for COD removal. The optimum hydraulic retention time and temperature observed for municipal wastewater in China for the application of an up-flow anaerobic filter (UAF) reactor using mixed culture were 3 days and 33.7 C with the maximum average COD removal of 91% (Ladu et al., 2014). Devi et al. (2008) discovered a good trend for the percent COD and BOD concentration reduction in municipal wastewater with a higher agitation speed. The COD removal from that research was 92% and, the agitation speed used was 150 rpm Table 6 summarizes the ANOVA for COD removal, which functions to evaluate the model's coefficient, verify the significance of parameters, and designate the strength of interaction for each parameter. The R 2 for this model is 0.9156, suggesting a good fit model by Olmez (2009) which mentioned that R 2 should be at least 0.80.
The Pareto chart displayed the main and interaction effects of the factors for the removal of COD in Figure 2. From the chart, retention time and agitation exhibit the significance in the removal of COD as the main effect. Meanwhile, SW: AMC ratio and support media displayed an insignificant effect on COD removal since the bar lies below the t-value limit. As illustrated in Table 6, retention time exhibited the highest percent contribution among other factors towards COD removal. As shown by Figure 2, retention time and agitation presented a positive influence on the removal of COD. The percentage of COD removal is increasing with increased retention time and agitation speed. When the factor is proportional to the response value, the effect is positive. Musa and Idrus (2020) stated that the percent removal of COD in wastewater rose from 92% to 96% after changing the retention time from 1 day to 3 days. The higher number in retention time is related to the higher COD removal percentage efficiency. Nayl et al. (2017) also proved that the higher agitation rate resulted in higher COD removal for municipal wastewater. Halalsheh et al. (2011) reported that the longer retention time in wastewater contributes to the scum's reduction, developing the potential of a system and greater removal of COD. As for the effects of interaction, two interaction effects of CD (agitation and retention time) and AD (SW: AMC ratio and retention time) contributed to the removal of COD with the negative effects. Figure 3 represented the effect of two independent variables on the removal of COD. Figure 3a shows the agitation value for 0 rpm and 100 rpm. The percent removal of COD was 58.32% at 0 rpm and 56.04% at 100 rpm, which slightly lower than at 0 rpm agitation speed. These implied the insignificant impact both agitation values shown of the removal of COD. Hu et al. (2019) revealed that the cultivation of P. cruentum was optimum at 150 rpm agitation speed, with the increase of its biomass concentration approximately 19-57% compared to the cultivation of microalgae at other agitation speeds. From Figure 3b, the removal of COD was up to 73.46% with 2 days of retention times. At 5 days of retention times, however, the value decreased to 56.04%. Short retention time maximizes COD removal. Jiang et al. (2020) stated that the extension of hydraulic retention to 30 hours caused the decreased biomass, which indicated the discharge of the poor adaptability of   microorganism and low microbial activity in the reaction system gradually. The microbial community structure was no longer suitable for the current operating conditions (Li et al., 2009;Kurokawa and Tanisho, 2005) when hydraulic retention time extended to 40 hours; the possible reason could be due to the continuous loss of biomass. The removal rates of COD and TSS could be optimized by designing the comparatively shorter hydraulic time and optimizing the effectiveness of COD removal in municipal wastewater (Christianson et al., 2016). Figure 4a and b presented the effect of an interaction between the ratio SW: AMC and retention time and between SW: agitation and retention time on COD removal.

Factor screening for ammonia-N removal
The percent contribution of each factor towards the removal of ammonia-N was A -Ratio SW:AMC (7.20%), B -Support Media (15.67%), C -Agitation (1.33%) and D -Retention Time (3.06%). The support media has the highest percentage contribution and, the agitation has the least percentage contribution. The highest removal of ammonia-N was noted on day 2 of retention time which is 66.67%. Table 7 summarizes the ANOVA for ammonia-N removal. The R 2 of 0.9831 implied that the process could be represented by this model. Figure 5 displayed the Pareto chart, showing the main and interaction effects of the factors on ammonia-N removal. For the main effect, support media exhibited the highest percentage contribution to ammonia-N removal. Chung et al. (2000) proved that support media mostly effective in removing ammonia-N in wastewater such as zeolites. There was approximately 88-92% removal of ammonia-N and high settleability in the final discharge of wastewater in this experiment. As exhibited by Table 8, support media contributed the most to the removal of ammonia-N compared to other factors. Figure 5 shows the positive effect of support media on the removal of ammonia-N. Valdivia et al. (2007) proved that using polypropylene foam as support media, ammonia removal values could be achieved over 50% from municipal wastewater. For the effects of interaction, factor BC (support media and agitation) contributed the most to the removal of ammonia-N, followed by factor AD (SW: AMC ratio and retention time). The experiments conducted by Martins et al. (2018) concluded that 100 rpm of agitation speed was the best condition among other parameters that lowered ammonia-N concentration in wastewater. Figure 6 exhibited the effect of two independent variables on the removal of ammonia-N. As illustrated by the Pareto chart in Figure 5, the support media displayed as the most significant factor in removing ammonia-N as it lies above the t-value limit line in a positive effect. From Figure 6a, Ammonia-N removal reached up to 37.30% when support media was used; however, the value of ammonia-N removal increased to 42.70% without support media. In the wastewater industry, many smaller treatment sewages that works do exist, which faced the discharge limits of ammonia but, where denitrification is non-essential. This was proven that sometimes, ammonia-N removal works better even without support media (Horan, 1994). Figure 6b shows that the studied ratio of SW: AMC (1:1 and 3:1) is significant to ammonia-N removal. Ammonia-N removal was 9.80 % at a ratio of 1:1 while it became higher, which was 42.70 % when the ratio of 3:1 was applied. The removal rate of ammonia-N was two times higher in wastewater treatment with the application of mixed culture rather than a single culture and that the ratio of denitrification was remarkably high as compared to in single culture (Joo et al., 2007). Figure 7a presented the effect of an interaction between the support media and agitation and between SW: AMC (1:1 and 3:1) ratios and retention time (2 and 5 days) on the removal of ammonia-N. Good performance was seen on the removal of ammonia-N when 0 rpm was applied (black line). The significant difference in the presence of support media was exhibited on ammonia-N removal, as the removal was up to 40.83% without the support media, and only 19.17% removal was achieved with the presence of support media. These implied that without agitation, the removal rates were better than with the involvement of support media because support media can be a disturbance for the ammonia-N removal when agitation is not applied (Sonawane et al., 2015). A better performance was observed when 100 rpm (red line) agitation speed was applied than 0 rpm. The removal rates of ammonia-N exhibited no significant difference with or without the presence of support media, with 37.30% and 42.70%, respectively. The increment in ammonia-N removal at 100 rpm was likely because of two possibilities. First was the presence of microorganisms associated with Pseudomonas sp. and Comamonas sp. in the bed reactor that caused the endogenous denitrification of biomass lysed by shearing at that agitation speed. The lack of Ar/CO 2 atmosphere in the headspace of the reactor to sustain the anaerobic agitation conditions at that speed was also one of the possibilities. This condition had caused the enabling of nitrification by nitrite-oxidizing bacteria (NOB) and subsequent reduction of nitrate because at 100 rpm there was no more nitrate accumulation than the one produced by the anaerobic oxidation of ammonium (Martins et al., 2018). As designated by the Pareto chart in Figure 5, support media was observed as the most significant factor as the bar extends above the t-value limit and displayed positive values. From Figure 7b, when 2 days of retention time (black line) was used, the performance on ammonia-N improved at SW: AMC ratio of 1:1, which is 29.44%, while dropped to 15.80% at 3:1 ratio. These are because even at a short time (2 days), the same amount of the reaction between synthetic wastewater and acclimatized mixed culture can already be completed. The significant difference was perceived when 5 days of retention time (black line) was applied at both ratios and produced better performance on ammonia-N removal. At a ratio of 1:1 SW: AMC, ammonia-N removal was only 9.80 %, while at 3:1 ratio, the ammonia-N removal presented a higher value which was 42.70 %. The results indicate that retention time plays an essential role in ammonia removal. Faizal et al. (2014) also agreed that biological treatment occurs with a retention time of 63-250 minutes, and the range of initial concentration of ammonia-N from 276 to 530 mg/L gives higher ammonia-N removal from 20.92 -56.52% in wastewater treatment.

Best conditions for COD and ammonia-N removal
A validation experiment was carried out based on the best conditions suggested by Design-Expert software (Table 8) by using a SW: AMC ratio of 3:1, an agitation speed of 100 rpm, and a retention time of 5 days. At those parameters, COD and ammonia-N removal were at the highest percentage. El-Gawad and El-Aziz (2018) proven that using 100 rpm for agitation speed with 4 days of retention time resulted in 67% of COD removal in wastewater. Adeleke et al. (2019) also revealed that better performance of COD removal in wastewater was obtained by using 150 agitation speeds which is up to 71%. The experiment was carried out in three runs to calculate the percentage error between the actual and predicted result using Eq. (2). Table 9 presented the predicted and actual value for COD and ammonia-N removal. Run 2 was selected due to the lowest value of error for COD and ammonia-N compared to other runs. The low value of error indicated that the experimental value was reasonably closed to the predicted values. From the validation experiment, we managed to get only 57.23% for COD removal and 43.20% ammonia-N removal, respectively.
3.6. Optimization study of COD removal The best conditions obtained from TLFD screening were optimized by RSM method. In this design of experiment, CCD was implemented for the optimization of COD and ammonia-N removal. The two major factors involved in this study were agitation speed and retention time. A total of 13 experimental runs were generated with different setup conditions (Table 10). A second-order quadratic equation was established with the experimental data and was presented by Eqs. (3) and (4) in terms of coded and actual values, respectively. COD ¼ 52:56 þ 13:10x 1 þ 1:78x 2 À 1:13x 1 x 2 À 2:762x 1 2 À 0:13x 2 2 (3) COD ¼ À 137:9828 þ 1:8582x 1 þ 25:0225x 2 À 0:0902x 1 x 2 À 4:4160E À003 x 1 2 À 1:2451x 2 2 (4) The statistical significance of the regression model was checked by the F-test in the analysis of variance (ANOVA). Effects with a confidence level higher than 95 % (p-value less than 0.05) were preferable to represent the reliability of a result. From the ANOVA result summarized in Table 11, the p-value of the model was 0.0042, which is more than a 95% confidence level. The small p-value indicates the significance of the corresponding coefficient (Zhao et al., 2011). The agitation displayed a significant effect on the biological treatment of municipal wastewater, supported by its low p-value. The R 2 value of 0.8781 and the R adj value of 0.7911 implying that the computed model satisfactorily correspond to the experimental data. The R 2 was used to signify how close the data to the regression line, and the value of R 2 should not be less than 80% (Karazhiyan et al., 2011). The correlation of actual and predicted values of COD concentration was displayed in Figure 8. A linear distribution was seen, indicating the well-fitting model. The normal probability plot reveals that the residuals followed a normal distribution, forming an almost straight line. Figure 9 displayed the influence of the two independent parameters on the COD removal. COD removal increases with agitation from 75 rpm to 125 rpm, as depicted by Figure 9(a). These indicate that the increase of agitation speed has a positive influence on COD removal. Alam et al. (2003) recorded the maximum reduction of organic substances in municipal wastewater treatment plants using a mixed culture of Penicillium corylophilum and Aspergillus niger in a batch fermenter was observed at 150 to 200 rpm agitation speed. There were no effective outcomes discovered at a higher agitation rate. Higher agitation at 120 rpm can supply adequate mixing, enhancing substrate conversion efficiency in an anaerobic digester by providing intimate contact between wastewater and its mixed culture. However, too high agitation (over 120 rpm) will cause cell disruption of mixed culture. Figure 9(b) displayed the effect of retention time on COD removal. The figure demonstrated that the optimum retention time of COD removal was 5 days. The retention time did not contribute much to the COD removal as there was only a slight difference between the COD removal from 4.5 to 5 days. These explained the large p-value of 0.3909 obtained from the ANOVA (Table 11). The interaction effect among parameters on COD removal was represented graphically by the contour and 3D plot, portrayed in Figure 10a and b. The figures demonstrated that the COD removal at any retention time was influenced by the agitation speed. The increase in agitation speed had caused an increase in COD removal. The optimum conditions for COD removal value of 70.6% % were 150 rpm and 5 days of retention time.

Optimization study of Ammonia-N removal
Thirteen experimental runs with different retention times and agitation speeds were performed according to Table 10. A second-order polynomial equation was developed with the experimental data and was presented in both coded and actual forms displayed by Eqs. (5) and (6), respectively.
Ammonia À N ¼ 46:68 þ 11:90x 1 þ 5:95x 2 þ 0x 1 x 2 À 2:98x 1 2 À 1:55x 2 2 (5) Ammonia À N ¼ À261:417 þ 1:3998x 1 þ 73:8145x 2 À 4:978E À015 x 1 x 2 À 4:6185E À003 x 1 2 À 6:1911x 2 2 The ammonia-N removal model was better fitted with a quadratic polynomial model since the adjusted R2 of the quadratic model (0.8759) was higher than other models for all responses. The ANOVA in Table 12 showed the p-value of the model was 0.0007, which is significant. The pvalue below 0.05 indicates the significancies of the model. The agitation displayed a significant influence on the removal of ammonia-N, supported by its less than 0.0001 p-values. The R 2 value of 0.9276 and the R adj value of 0.8759 signified that the computed model and the experimental data were adequately matched. Olmez (2009) proposed that for a good fit of a bioprocess model, R 2 should at least be 0.80. Since the R 2 for this model is more than 0.8, this model was accepted and could present the process.  Figure 11. Correlation of the predicted and actual values.
A. Ya'acob et al. Heliyon 8 (2022) e09685 Figure 11 portrayed the correlation of predicted and actual values of ammonia-N concentration displaying a linear dispersion. These suggest that the model was well-fitted with the expected values comparable with the observed values. Figure 12a and b depicted the influence of independent parameters on ammonia-N removal. The plotted data demonstrate the effects of agitation and retention times on ammonia-N removal. Both parameters were observed to be significant contributors to ammonia-N removal. Ammonia-N removal increased from 28.57 to 53.57 percent, with an increase of agitation from 75 rpm to 125 rpm, as shown in Figure 5a. The effect of retention time was displayed in Figure 5b. The optimum retention time for the ammonia-N removal is at 5 days, with 60.71% removal.
The agitation speed recorded by Alam et al. (2003) shows that the maximum reduction of organic substances in oil palm industrial wastes was obtained at 150-200 rpm. A higher reduction (3%) of organic material was obtained in the fungal-treated system. There were no effective results discovered at an agitation speed of more than 200 rpm. Therefore, 150 rpm was selected as the optimized mixing speed and made constant during the treatment process. While for retention time, longer retention time led to an increased ammonia-N removal percentage as the reaction between the microbes and the wastewater was completed (Gil et al., 2011). These were also proved by the shaking speed and retention time recorded by Lalung and Ismail (2015), with 150 rpm of shaking speed and 5 days of retention time for reducing the organic matter by bacterial strains in palm oil mill effluent.
The interaction between retention time and agitation speed on the removal of ammonia-N was demonstrated by the contour and the 3D plot (Figure 13a and b). Increasing agitation resulted in the higher removal of ammonia-N. Figure 6a clearly showed that at the agitation of 150 rpm and retention time of 5 days, ammonia-N had the highest removal. From the contour plot, the elliptical profile proved an interaction between agitation and retention time. It can be explained that as agitation increased, the removal of ammonia-N was increased. Nevertheless, once the agitation and retention time was greater than the center point value, the reverse trend was observed. From Figure 6b, the 3D surface graph generated in a slight dome shape in which maximum points were obtained at standard Run 6 whose removal of ammonia-N was 60.71 percent. Figure 12. Effect of (a) agitation and (b) retention time on ammonia-N removal (%). Table 13 represented the optimum conditions suggested by the Design-Expert software and from the validation experiment. It was observed that 60.1% of ammonia-N removal and 64.6% of COD removal were achieved at 125 rpm and 5.5 days. The suggested optimum condition obtained from the experiment reported that the optimum condition of 150 rpm agitation speed and 5 days of retention times had resulted in 70.6% and 64.6% of COD and ammonia-N removal, respectively. The validation experiment was conducted according to the two different suggested optimum conditions to validate the results. The outcome shows that the validation values were reasonably comparable with the predicted values. The removal of ammonia-N and COD of 64.29% at 70.41% was obtained at optimum conditions of 150 rpm and 5 days of retention times.

Optimum conditions
A similar study by Nayl et al. (2017) had proved that a higher agitation speed applied had resulted in higher COD (90.4%) and ammonia-N (80.6%) being removed from the wastewater with 100-700 rpm agitation speed. Wang et al. (2016) stated that the concentration of COD increased with low agitation speed and displaying an opposite tendency with rapid mixing speed though there still were some fluctuations. It could be deduced that moderate agitation by slow mixing could help fulfilling collision and contact when combined with the morphology of flocks during experiments. Slight mixing suppressed the process;  intense mixing had an adverse effect due to its irreversible damage to flocks. Short retention time maximizes COD and ammonia-N removal. Jiang et al. (2020) stated that when retention time was extended to 30 hours, the biomass began to decrease, which indicated that the microorganisms with poor adaptability and low microbial activity in the reaction system were gradually discharged. The microbial community structure was no longer suitable for the current operating conditions (Li et al., 2009;Kurokawa and Tanisho 2005) when retention time extended to 40 hours; the possible reason could be the continuous loss of biomass. Designing for relatively shorter retention time optimized COD and ammonia-N removal rates (Christianson et al., 2016). However, according to Li et al. (2014), the removal percentages of COD and ammonia-N were increased with the increase of retention time from 5 to 40 days. These illustrate that the longer retention time had resulted in more COD and ammonia-N being removed from the systems. The result obtained from the previous study was reported to be similar to the present study. The percentage of error was predicted using Eq. (2). The error was ranging from 0.19% to 5.56%.

Conclusion
This study was conducted objectively to determine the most significant factors contributing to the removal of COD and ammonia-N from a municipal wastewater treatment plant by using two-level factorial analysis. The best conditions for wastewater from the municipal wastewater industry were a SW: AMC ratio of 3:1, 100 rpm agitation, no support media and a retention time of 5 days. COD and ammonia-N removal percentage achieved up to 57.23% and 43.20%. The major factors contributing to the inhibition of microbial growth were further optimized through a response surface methodology. The maximum COD and ammonia-N removal achieved was 70.41% and 64.29% at optimum conditions of 150 rpm and 5 days. These results show that the COD and ammonia-N removal was increased from 57.23% to 70.41% for COD and 43.20% to 64.29% for ammonia-N.

Author contribution statement
Norazwina Zainol: Conceived and designed the experiments; Contributed reagents, materials, analysis tools or data.
Amirah Ya'acob & Nor Hazwani Aziz: Performed the experiments; Analyzed and interpreted the data; Wrote the paper.

Data availability statement
Data included in article/supp. material/referenced in article.

Declaration of interests statement
The authors declare no conflict of interest.

Additional information
No additional information is available for this paper.